package com.jfinal.entity;

import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;

/**
 * Created by li on 2016/7/16.
 */
public class Base<T extends Base> extends Model {


    public Base(){
        super();
    }

    public Page<T> paginate(int pageNumber, int pageSize) {
        //这里体会到了jfinal的强大之处，mysql和oracle的分页都只需下面这一句就可以了。。
        return paginate(pageNumber, pageSize, "select * ","from test_blog order by id asc");
    }

}
